package com.shrct.businessprocess.product.events;

import com.shrct.businessprocess.organization.RCEnterprise;
import com.shrct.businessprocess.product.RCIdentifiablePhysicalProductEntry;
import com.shrct.businessprocess.product.events.RCIdentifiablePhysicalProductEntryEventsListener;
import com.shrct.businessprocess.purchase.RCPurchaseOrderItem;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.product.events.RCIdentifiablePhysicalProductEntryEventsManager")
public class RCIdentifiablePhysicalProductEntryEventsManager extends EntityEventsManager<RCIdentifiablePhysicalProductEntry> {
  @Autowired(required = false)
  private Collection<RCIdentifiablePhysicalProductEntryEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCIdentifiablePhysicalProductEntryEventsListener> getListeners() {
    return listeners;
  }
  
  public void fire_inStock(final RCIdentifiablePhysicalProductEntry entity, final RCPurchaseOrderItem orderItem) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._inStock(entity,orderItem);
    }
    
  }
  
  public void fire_deliver(final RCIdentifiablePhysicalProductEntry entity, final RCEnterprise enterprise) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._deliver(entity,enterprise);
    }
    
  }
  
  public void fire_import(final RCIdentifiablePhysicalProductEntry entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._import(entity);
    }
    
  }
  
  public void fire_return(final RCIdentifiablePhysicalProductEntry entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._return(entity);
    }
    
  }
  
  public void fire_rmaReplace(final RCIdentifiablePhysicalProductEntry entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._rmaReplace(entity);
    }
    
  }
  
  public void fire_rmaImport(final RCIdentifiablePhysicalProductEntry entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._rmaImport(entity);
    }
    
  }
  
  public void fire_cancelInStock(final RCIdentifiablePhysicalProductEntry entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCIdentifiablePhysicalProductEntryEventsListener)listener)._cancelInStock(entity);
    }
    
  }
}
